package com.d0327.Z27;
import java.util.Scanner;
import java.util.regex.Pattern;

public class AddTest {
    public static boolean isNumeric(String str) {
     Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
     return pattern.matcher(str).matches();
 }

 public static boolean isDouble(String str) {
     Pattern pattern = Pattern.compile("^[-\\+]?[.\\d]*$");
     return pattern.matcher(str).matches();
 }
    public static void main(String[] args) {

        Scanner sc=new Scanner(System.in);
        Double dou=0.0;
        Double sum=0.0;
        String str1="";
        while(true){

                str1=sc.next();
                str1.split(" ");
                isDouble(str1);
                isNumeric(str1);
               /* if (str1.equals("exit")){
                    break;
                }*/
            dou=Double.valueOf(str1);
            sum=sum+dou;
            }
        //System.out.println("累加结果为:"+sum);
        //Integer a=Integer.parseInt("123");


    }
    }


